<%@ page language="java" contentType="text/html; charset=UTF-8"

         pageEncoding="UTF-8" %>

<%@page import="java.util.List" %>
<%@ page import="Entity.Fettle" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

    <meta http-equiv="Content-Type" ontent="text/html; charset=UTF-8">

    <title>Insert title here</title>
    <style type="text/css">
        #shops {
            margin-left: 36px;
            margin-top: 20px;
        }

        .label {
            display: inline;
            padding: .2em .6em .3em;
            font-size: 18px;
            font-weight: 700;
            line-height: 1;
            color: #fff;
            text-align: center;
            white-space: nowrap;
            vertical-align: baseline;
            border-radius: .25em;
        }

        th {
            text-align: center;
            padding: 5px;
            font-size: 16px;
            border: 1px solid #ddd
        }

        td {
            text-align: center;
            padding: 5px;
            font-size: 16px;
            border: 1px solid #ddd
        }

        img {
            width: 60px;
            height: 50px;
        }

        tr {
            display: table-row;
            vertical-align: inherit;
            border-color: inherit;
            border-top-color: inherit;
            border-right-color: inherit;
            border-bottom-color: inherit;
            border-left-color: inherit;
        }

        #table1 {
            border-spacing: 0;
            border-collapse: collapse;
            width: 1400px;
        }
    </style>

</head>

<body>
<div id="shops">
    <div>
        <h1 style="background-color: #5bc0de;" class="label">人才管理系统</h1>
        <input type="text" id="info" style="width: 305px; height: 42px; margin-left: 275px;
                 border: 4px crimson solid; padding: 3px 6px"
               placeholder="阿里巴巴">
        <button id='btn' style='width: 110px; height: 40px; padding: 3px 6px; background-color: #C40000;
            border: 1px crimson solid; font-size: 20px; font-weight: bold; color: white;
            cursor: pointer;'>
            搜公司
        </button>
    </div>
        <%

    List<Fettle> allemp = (List<Fettle>) request.getAttribute("allemp");

    int size = 0;

    if(allemp!=null){

    size = allemp.size();

    }

%>
    <br><br>
    <div>
        <table style="border: 1px solid #ddd;" id="table1">
            <thead style="background-color: #DFF0D8">
            <tr style="height: 30px">
                <th>序号</th>
                <th>姓名</th>
                <th>ID</th>
                <th>联系电话</th>
                <th colspan="2" align="center">操作</th>
            </tr>
            </thead>
            <%

                for (int i = 0; i < size; ++i) {

            %>

            <tr>
                <td><%=allemp.get(i).getId()%>
                </td>
                <td><%=allemp.get(i).getSname()%>
                </td>
                <td><%=allemp.get(i).getSid()%>
                </td>
                <td><%=allemp.get(i).getSphone()%>
                </td>
                <td>
                    <a href="Resigned?id=<%=allemp.get(i).getId()%>">解约</a>
                    <a href="seinformation?sid=<%=allemp.get(i).getSid()%>">查看</a></td>
            </tr>

            <%

                }

            %>
        </table>
    </div>

</body>

</html>